package com.example;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping
public class TestController {

    @RequestMapping("/test")
    @ResponseBody
    public User user() {
        return new User("test2");
    }

    @RequestMapping("test2")
    @ResponseBody
    public User user2() {
        throw new NumberFormatException("123");
    }
}
